<%@ page language="java" contentType="text/html; charset=UTF-8"	 pageEncoding="UTF-8"%>
<%@ include file="../include/laypublic.jsp"%>
<!DOCTYPE html>
<html>
<head>
  <title>融资尽调新增</title>
</head>
<style>
	.fieldset{
		margin-top: 5px;
		margin-bottom: 0px
	}
	.layui-legend{
		background-color:#5fb878;
		font-size:15px !important;
		width:150px;
	}
	.layui-form-item {
	    margin-bottom: 5px;
	    clear: both;
	    *zoom: 1;
	}
	.layui-form-label{width: 180px;}
	.width106{
		width:106px;
	}
	.bankRow+.bankRow{
	   border-top:1px solid #e0e0e0;
	   margin-top:20px;
	   padding-top:20px;
	}
	
</style>
<body>
<div class="layui-fluid">
    <div class="layui-card">
	    <div class="layui-tab-item layui-show">
	    	<div style="padding-top:15px;">&nbsp;</div>
			<form class="layui-form" id="addInfo_form" lay-filter="addInfo_form">
			<fieldset class="layui-elem-field layui-field-title fieldset"  id="baseInfo">
			<legend class="layui-btn layui-legend" style="text-align:left;cursor:default;">项目基础信息  ></legend>				
			  <div style="margin-top:20px">
			  	<div class="layui-form-item">
			  		<div class="layui-inline">
				      	<label class="layui-form-label">申请公司</label>
				      	<div class="layui-input-inline">
							<input type="hidden" name="hrOrgid" value="${bindOrgId}">
							<input type="text" value="${bindOrgName}" style="border:0px;width:220px" readonly="readonly" class="layui-input">
				      	</div>
				    </div>
				    <div class="layui-inline">
				    	<label class="layui-form-label">申请部门</label>
			      		<div class="layui-input-inline">
			      			<input type="hidden" name="hrDeptid" value="${bindDeptId}">
							<input type="text" value="${bindDeptName}" style="border:0px;" readonly="readonly" class="layui-input">
			      		</div>
				    </div>
			  	</div>
			  	<div class="layui-form-item">			  		
				    <div class="layui-inline">
				    	<label class="layui-form-label">申请人</label>
			      		<div class="layui-input-inline">
			        		<input type="hidden" name="hrStaffApplyid" value="${SESSION_KEY_USER_DETAIL.hrStaffId }">
			        		<input type="text" name="staffname" value="${staffName }" readonly="readonly" style="border:0px" autocomplete="off" class="layui-input">
			      		</div>
				    </div>
			    </div>
			  	<div class="layui-form-item">
			  		<div class="layui-inline">
					    <label class="layui-form-label">项目名称</label>
				      	<div class="layui-input-inline">
					      	<select id="add_select_proId" name="proname" lay-filter="add_select_proId" lay-verify="required" lay-search>
					      		<option value="">请选择-项目名称</option>
				      				<c:if test="${not empty allProName }">
				              			<c:forEach items="${allProName}" var="proNames">
				              				<option value="${proNames.proCode }">${proNames.proName }</option>
					            		</c:forEach>
				              		</c:if>
				      		</select>
				      	</div>
					</div>
					<div class="layui-inline">
		            	<label class="layui-form-label">项目所属行业</label>
		            	<div class="layui-input-inline">
		              		<input type="text" name="areaName" placeholder="请输入项目所属行业" maxlength="20" lay-verify="required|COC" autocomplete="off" class="layui-input">
		            	</div>
          			</div>
				</div>    
				 <div class="layui-form-item">
				 	<div class="layui-inline">
				      	<label class="layui-form-label">项目所在地</label>
				      	<div class="layui-input-inline">
							<select id="query-select-sgCityId"
									lay-filter="query-select-sgCityId" lay-verify="required" disabled="disabled"
									>
							</select>
							<input type="hidden" name="sgCityId" id="query-select-sgCityId_hidden" />
				      	</div>
				    </div>
				    <div class="layui-inline">
				      	<label class="layui-form-label">项目实施单位</label>
				      	<div class="layui-input-inline">
							<select id="query-select-carryOrg"
									lay-filter="query-select-carryOrg" lay-verify="required" disabled="disabled"
									>
							</select>
							<input type="hidden" name="carryOrg" id="query-select-carryOrg_hidden" />
				      	</div>
				    </div>			 
				 </div>
				 <div class="layui-form-item">
				 	<div class="layui-inline">
				      	<label class="layui-form-label">建设内容</label>
				      	<div class="layui-input-inline">
				      		<textarea id="query-select-proRemarks" name="proRemarks" class="layui-textarea" maxlength="500"
								readonly="readonly" lay-verify="required" style="width: 899px; height: 90px;"></textarea>
				      	</div>
				    </div>
				 </div> 
			  </div>
			</fieldset>
			<fieldset class="layui-elem-field layui-field-title fieldset"  id="investmentScale">
		  		<legend class="layui-btn layui-legend" style="text-align:left;cursor:default;">投资规模  ></legend>
			  	<div style="margin-top:20px">
			  		<div class="layui-form-item">
					    <div class="layui-inline">
					    	<label class="layui-form-label">费用类型</label>
				      		<div class="layui-input-inline">
					      		<input type="text" name="feeType" value="" style="border:0px;" readonly="readonly"
					      		 autocomplete="off" class="layui-input">
				      		</div>
					    </div>
					    <div class="layui-inline">
					    	<label class="layui-form-label">金额（万元）</label>
				      		<div class="layui-input-inline">
					      		<input type="text" name="fee" value="" style="border:0px;" readonly="readonly"
					      		 autocomplete="off" class="layui-input">
				      		</div>
					    </div>
					    <div class="layui-inline">
					    	<label class="layui-form-label" style="text-align:center;width:140px;">是否符合市场营销底线管理办法要求？</label>
				      		<div class="layui-input-inline" style="width:30px;">
					      		<input type="text" name="choose" value="" style="border:0px;" readonly="readonly"
					      		 autocomplete="off" class="layui-input">
				      		</div>
					    </div>
				    </div>
				 <div class="layui-form-item">   
				    <div class="layui-inline">
				    	<label class="layui-form-label">建安工程费（万元）</label>
				    	<div class="layui-input-inline" style="margin-left:315px;">
				    	<select id="query-select-costCae"
									lay-filter="query-select-costCae" lay-verify="required" disabled="disabled"
									>
						</select>
						<input type="hidden" name="costCae" id="query-select-costCae_hidden" />
						</div>
				    </div>
				    <div class="layui-inline">
				    	<label class="layui-form-label" style="width:80px;"></label>
				    	<div class="layui-input-inline" style="margin-left:12px;width:150px;">
				    	<select name="costCaeFlag" lay-verify="required">
			      			<option value="">请选择</option>
			      			<option value="0">否</option>
			      			<option value="1">是</option>
						</select>
						</div>
				    </div>	    
				 </div> 
				 <div class="layui-form-item">   
				    <div class="layui-inline">
				    	<label class="layui-form-label">设备购置工程费（万元）</label>
				    	<div class="layui-input-inline" style="margin-left:315px;">
				    	<select id="query-select-deviceCost"
									lay-filter="query-select-deviceCost" lay-verify="required" disabled="disabled"
									>
						</select>
						<input type="hidden" name="deviceCost" id="query-select-deviceCost_hidden" />
						</div>
				    </div>
				    <div class="layui-inline">
				    	<label class="layui-form-label" style="width:80px;"></label>
				    	<div class="layui-input-inline" style="margin-left:12px;width:150px;">
				    	<select name="deviceCostFlag" lay-verify="required">
			      			<option value="">请选择</option>
			      			<option value="0">否</option>
			      			<option value="1">是</option>
						</select>
						</div>
				    </div>	    
				 </div> 
				 <div class="layui-form-item">   
				    <div class="layui-inline">
				    	<label class="layui-form-label">预备费（万元）</label>
				    	<div class="layui-input-inline" style="margin-left:315px;">
				    	<select id="query-select-inReadyCost"
									lay-filter="query-select-inReadyCost" lay-verify="required" disabled="disabled"
									>
						</select>
						<input type="hidden" name="inReadyCost" id="query-select-inReadyCost_hidden" />
						</div>
				    </div>
				    <div class="layui-inline">
				    	<label class="layui-form-label" style="width:80px;"></label>
				    	<div class="layui-input-inline" style="margin-left:12px;width:150px;">
				    	<select name="inReadyCostFlag" lay-verify="required">
			      			<option value="">请选择</option>
			      			<option value="0">否</option>
			      			<option value="1">是</option>
						</select>
						</div>
				    </div>	    
				 </div> 
				 <div class="layui-form-item">   
				    <div class="layui-inline">
				    	<label class="layui-form-label">建设期利息（万元）</label>
				    	<div class="layui-input-inline" style="margin-left:315px;">
				    	<select id="query-select-periodInterest"
									lay-filter="query-select-periodInterest" lay-verify="required" disabled="disabled"
									>
						</select>
						<input type="hidden" name="periodInterest" id="query-select-periodInterest_hidden" />
						</div>
				    </div>
				    <div class="layui-inline">
				    	<label class="layui-form-label" style="width:80px;"></label>
				    	<div class="layui-input-inline" style="margin-left:12px;width:150px;">
				    	<select name="periodInterestFlag" lay-verify="required">
			      			<option value="">请选择</option>
			      			<option value="0">否</option>
			      			<option value="1">是</option>
						</select>
						</div>
				    </div>	    
				 </div> 
				 <div class="layui-form-item">   
				    <div class="layui-inline">
				    	<label class="layui-form-label">铺底流动资金（万元）</label>
				    	<div class="layui-input-inline" style="margin-left:315px;">
				    	<select id="query-select-fluidCapital"
									lay-filter="query-select-fluidCapital" lay-verify="required" disabled="disabled"
									>
						</select>
						<input type="hidden" name="fluidCapital" id="query-select-fluidCapital_hidden" />
						</div>
				    </div>
				    <div class="layui-inline">
				    	<label class="layui-form-label" style="width:80px;"></label>
				    	<div class="layui-input-inline" style="margin-left:12px;width:150px;">
				    	<select name="fluidCapitalFlag" lay-verify="required">				    	
			      			<option value="">请选择</option>
			      			<option value="0">否</option>
			      			<option value="1">是</option>
						</select>
						</div>
				    </div>	    
				 </div> 
				 <div class="layui-form-item">   
				    <div class="layui-inline">
				    	<label class="layui-form-label">工程建设其他费（万元）</label>
				    	<div class="layui-input-inline" style="margin-left:315px;">
				    	<select id="query-select-otherCost"
									lay-filter="query-select-otherCost" lay-verify="required" disabled="disabled"
									>
						</select>
						<input type="hidden" name="otherCost" id="query-select-otherCost_hidden" />
						</div>
				    </div>
				    <div class="layui-inline">
				    	<label class="layui-form-label" style="width:80px;"></label>
				    	<div class="layui-input-inline" style="margin-left:12px;width:150px;">
				    	<select name="otherCostFlag" lay-verify="required">
			      			<option value="">请选择</option>
			      			<option value="0">否</option>
			      			<option value="1">是</option>
						</select>
						</div>						
				    </div>	    
				 </div>
				 <div class="layui-form-item">   
				    <div class="layui-inline">
				    	<label class="layui-form-label">总计</label>
				    	<div class="layui-input-inline" style="margin-left:315px;">				    	
							<input type="text" name="totalCost" id="totalCost" style="border:0px;" lay-verify="required" readonly="readonly" class="layui-input">
						</div>
				    </div>
				    <div class="layui-inline">
				    	<label class="layui-form-label" style="width:80px;"></label>
				    	<div class="layui-input-inline" style="margin-left:12px;width:150px;">
				    	<select name="totalCostFlag" lay-verify="required">
			      			<option value="">请选择</option>
			      			<option value="0">否</option>
			      			<option value="1">是</option>
						</select>
						</div>
				    </div>	    
				 </div>      
			</div>    
		</fieldSet>	    
		<fieldset class="layui-elem-field layui-field-title fieldset"  id="stockRight">
		  	<legend class="layui-btn layui-legend" style="text-align:left;cursor:default;">项目公司股权情况  ></legend>
		  		<div class="layui-form-item">
				    <div class="layui-inline">
				    	<label class="layui-form-label">资本金数额（万元）</label>
				    	<div class="layui-input-inline">
				    	<select id="query-select-capitalFund"
									lay-filter="query-select-capitalFund" lay-verify="required" disabled="disabled"
									>
						</select>
						<input type="hidden" name="capitalFund" id="query-select-capitalFund_hidden" />
						</div>
			      	</div>
					<div class="layui-inline">
				      	<label class="layui-form-label">资本金比例（%）</label>
				      	<div class="layui-input-inline">
				      	<select id="query-select-capitalPercent"
									lay-filter="query-select-capitalPercent" lay-verify="required" disabled="disabled"
									>
						</select>
						<input type="hidden" name="capitalPercent" id="query-select-capitalPercent_hidden" />
						</div>
					</div>
				</div>	      	
				<div class="layui-form-item">
					<div class="layui-inline">
				      	<label class="layui-form-label">我方股权出资金额（万元）</label>
				      	<div class="layui-input-inline">
				      	<select id="query-select-stockFund"
									lay-filter="query-select-stockFund" lay-verify="required" disabled="disabled"
									>
						</select>
						<input type="hidden" name="stockFund" id="query-select-stockFund_hidden" />
						</div>
					</div>
					<div class="layui-inline">
				      	<label class="layui-form-label">我方股权比例（%）</label>
				      	<div class="layui-input-inline">
				      	<select id="query-select-stockPercent"
									lay-filter="query-select-stockPercent' lay-verify="required" disabled="disabled"
									>
						</select>
						<input type="hidden" name="stockPercent" id="query-select-stockPercent_hidden" />
						</div>
					</div>	    		    
		  		</div>		  				    
		</fieldset>	  				  	
		<fieldset class="layui-elem-field layui-field-title fieldset" id="period">
	  		<legend class="layui-btn layui-legend" style="text-align:left;cursor:default;">合作周期  ></legend>
				 <div style="margin-top:20px">
				  	<div class="layui-form-item">
					    <div class="layui-inline">
					    	<label class="layui-form-label">合作周期（年）</label>
				      		<div class="layui-input-inline">
				      			<select id="query-select-workYears"
									lay-filter="query-select-workYears' lay-verify="required" disabled="disabled"
									>
								</select>
								<input type="hidden" name="workYears" id="query-select-workYears_hidden" />
				      		</div>
					    </div>
					    <div class="layui-inline">
					      	<label class="layui-form-label">建设周期（年）</label>
					      	<div class="layui-input-inline">
					      		<select id="query-select-buildYears"
									lay-filter="query-select-buildYears' lay-verify="required" disabled="disabled"
									>
								</select>
								<input type="hidden" name="buildYears" id="query-select-buildYears_hidden" />
					      	</div>
					    </div>
					 </div>
					 <div class="layui-form-item">
					    <div class="layui-inline">
					    	<label class="layui-form-label">运营周期（年）</label>
				      		<div class="layui-input-inline">
				      			<select id="query-select-omYears"
									lay-filter="query-select-omYears' lay-verify="required" disabled="disabled"
									>
								</select>
								<input type="hidden" name="omYears" id="query-select-omYears_hidden" />
				      		</div>
					    </div>
					    <div class="layui-inline">					      
				      		<label class="layui-form-label">回报机制</label>
				      		<input type="hidden" name ="backMech">
				      		<div class="layui-input-inline">
					      		<input type="checkbox" name="backMechName" value="1" title="政府付费" lay-skin="primary" disabled="disabled">
				      		</div>
				      		<div class="layui-input-inline">
								<input type="checkbox" name="backMechName" value="2" title="可行性缺口补助" lay-skin="primary" disabled="disabled"> 
				      		</div>
				      		<div class="layui-input-inline">
								<input type="checkbox" name="backMechName" value="3" title="使用者付费" lay-skin="primary" disabled="disabled"> 
				      		</div>				      	
					    </div>
					 </div>
					 <div class="layui-form-item">
					    <div class="layui-inline">
					    	<label class="layui-form-label">项目落地财政级别</label>
				      		<div class="layui-input-inline">
				      			<select id="query-select-cityLevel"
									lay-filter="query-select-cityLevel' lay-verify="required" disabled="disabled"
									>
								</select>
								<input type="hidden" name="cityLevel" id="query-select-cityLevel_hidden" />
				      		</div>
					    </div>
					 </div>
				</div>
			</fieldset>		    
					
			<fieldset class="layui-elem-field layui-field-title fieldset" id="financialState">
	  		<legend class="layui-btn layui-legend" style="text-align:left;cursor:default;">政府财政状况   ></legend>
				 <div style="margin-top:20px">
				  	<div class="layui-form-item">
					    <div class="layui-inline">
					    	<label class="layui-form-label">政府财政指标</label>
				      		<div class="layui-input-inline">
					      		<input type="text" name="financialIndex" value="" style="border:0px;" readonly="readonly"
					      		 autocomplete="off" class="layui-input">
				      		</div>
					    </div>
					    <div class="layui-inline">
					    	<label class="layui-form-label" style="text-align:center;">情况</label>
				      		<div class="layui-input-inline">
					      		<input type="text" name="situation" value="" style="border:0px;" readonly="readonly"
					      		 autocomplete="off" class="layui-input">
				      		</div>
					    </div>
					    <div class="layui-inline">
					    	<label class="layui-form-label" style="text-align:center;width:140px;">是否符合市场营销底线管理办法要求？</label>
				      		<div class="layui-input-inline" style="width:30px;">
					      		<input type="text" name="choose" value="" style="border:0px;" readonly="readonly"
					      		 autocomplete="off" class="layui-input">
				      		</div>
					    </div>
				    </div>
				<div class="layui-form-item">   
				    <div class="layui-inline">
				    	<label class="layui-form-label">项目入库情况</label>
				    	<div class="layui-input-inline" style="margin-left:306px;">
				    	<select name="isInStore" lay-verify="required">
			      			<option value="">请选择-入库情况</option>
			      			<option value="0">未入库</option>
			      			<option value="1">已入库</option>
						</select>
						</div>
				    </div>
				    <div class="layui-inline">
				    	<label class="layui-form-label" style="width:80px;"></label>
				    	<div class="layui-input-inline" style="margin-left:20px;width:150px;">
				    	<select name="isInStore2" lay-verify="required">
			      			<option value="">请选择</option>
			      			<option value="0">否</option>
			      			<option value="1">是</option>
						</select>
						</div>
				    </div>	    
				 </div> 
				 <div class="layui-form-item">   
				    <div class="layui-inline">
				    	<label class="layui-form-label">一般公共预算收入（亿元）</label>
				    	<div class="layui-input-inline" style="margin-left:306px;">
				    	<select id="query-select-pubIncome"
									lay-filter="query-select-pubIncome" lay-verify="required" disabled="disabled"
									>
						</select>
						<input type="hidden" name="pubIncome" id="query-select-pubIncome_hidden" />
						</div>
				    </div>
				    <div class="layui-inline">
				    	<label class="layui-form-label" style="width:80px;"></label>
				    	<div class="layui-input-inline" style="margin-left:20px;width:150px;">
				    	<select name="pubIncome2" lay-verify="required">
			      			<option value="">请选择</option>
			      			<option value="0">否</option>
			      			<option value="1">是</option>
						</select>
						</div>
				    </div>	    
				 </div>    
				 <div class="layui-form-item">   
				    <div class="layui-inline">
				    	<label class="layui-form-label">政府负债率（%）</label>
				    	<div class="layui-input-inline" style="margin-left:306px;">
				    		<input type="text" name="debtRate" placeholder="请输入政府负债率" maxlength="100" lay-verify="required|floatAmount" autocomplete="off" class="layui-input">
						</div>
				    </div>
				    <div class="layui-inline">
				    	<label class="layui-form-label" style="width:80px;"></label>
				    	<div class="layui-input-inline" style="margin-left:20px;width:150px;">
				    	<select name="debtRate2" lay-verify="required">
			      			<option value="">请选择</option>
			      			<option value="0">否</option>
			      			<option value="1">是</option>
						</select>
						</div>
				    </div>	    
				 </div>    
				 <div class="layui-form-item">   
				    <div class="layui-inline">
				    	<label class="layui-form-label">是否纳入财政预算的人大决议</label>
				    	<div class="layui-input-inline" style="margin-left:306px;">
				    	<select name="fitNpc" lay-verify="required">
			      			<option value="">请选择</option>
			      			<option value="0">否</option>
			      			<option value="1">是</option>
						</select>
						</div>
				    </div>
				    <div class="layui-inline">
				    	<label class="layui-form-label" style="width:80px;"></label>
				    	<div class="layui-input-inline" style="margin-left:20px;width:150px;">
				    	<select name="fitNpc2" lay-verify="required">
			      			<option value="">请选择</option>
			      			<option value="0">否</option>
			      			<option value="1">是</option>
						</select>
						</div>
				    </div>	    
				 </div>    
				    
				</div>
			</fieldset>	
			
			<fieldset class="layui-elem-field layui-field-title fieldset"  id="financialOrgans">
		  		<legend class="layui-btn layui-legend" style="text-align:left;cursor:default;">对接金融机构  ></legend>
				<div style="margin-top:20px">
				  		<div class="layui-form-item">
						    <div class="layui-inline">
						    	<label class="layui-form-label" style="width:60px;">序号</label>
					      		<div class="layui-input-inline" style="width:60px;">
						      		<input type="text" name="showInx" value="" readonly="readonly" style="border:0px" class="layui-input">
					      		</div>
						    </div>
						    <div class="layui-inline">
						      	<label class="layui-form-label" style="text-align:left;">银行名称</label>
						      	<div class="layui-input-inline" style="width:60px;">
						        	<input type="text" name="bankName" value="" readonly="readonly" style="border:0px" class="layui-input">
						      	</div>
						    </div>
						    <div class="layui-inline">
						      	<label class="layui-form-label" style="text-align:left;">银行性质</label>
						      	<div class="layui-input-inline" style="width:15px;">
						        	<input type="text" name="bankType" value="" readonly="readonly" style="border:0px" class="layui-input">
						      	</div>
						    </div>
						    <div class="layui-inline">
						      	<label class="layui-form-label"  style="text-align:left;">沟通内容及建议</label>
						      	<div class="layui-input-inline" style="width:60px;">
						        	<input type="text" name="advicement" value="" readonly="readonly" style="border:0px" class="layui-input">
						      	</div>
						    </div>
					    </div>
						<fieldset class="layui-elem-field layui-field-title fieldset"  id="abutment">
					  		<legend style="margin-left:40px;font-size:15px;font-weight:bold;"></legend>
						  	<div style="margin-top:20px" id="subDiv">
						    	<div id="bankRow1" class="bankRow" >
							  		<div class="layui-form-item">
							    		<div class="layui-inline width106">
									    	<label class="layui-form-label" style="width:60px;">1</label>
									    	<div class="layui-input-inline">
									    		<input class="width108" type="hidden" name="subShowIdx" value="1"/>
									    	</div>
									    </div>
									    <div class="layui-inline">
									    	<label class="layui-form-label" style="width:35px;"></label>
								      		<div class="layui-input-inline" style="width:200px;">
									      		<input type="text" name="subBankName" placeholder="请输入银行名称" value="" maxlength="100" lay-verify="required|COC" autocomplete="off" class="layui-input">
								      		</div>
									    </div>
									    <div class="layui-inline">
									      	<label class="layui-form-label" style="width:45px;"></label>
									      	<div class="layui-input-inline" style="width:150px;">
									      		<select name="subBankType" lay-verify="required">
									      			<option value="">请选择-银行性质</option>
									      			<option value="1">国有银行</option>
									      			<option value="2">地方主流银行</option>
									      			<option value="3">政策性银行</option>
									      			<option value="4">股份制银行</option>
												</select>								     
									      	</div>
									    </div>
									    <div class="layui-inline">
									      	<label class="layui-form-label" style="width:45px;"></label>
									      	<div class="layui-input-inline" style="width:200px;">
									        	<input type="text" name="subAdvice" placeholder="请输入沟通内容及意见" value="" lay-verify="required" autocomplete="off" class="layui-input">
									      	</div>
									    </div>
									    <div class="layui-inline">
									    	<button type="button" class="layui-btn layui-btn-sm" id="addBankBtn1" onclick="addBankRow(this)"><i class="layui-icon">&#xe654;</i></button>
									    	<button type="button" class="layui-btn layui-btn-sm" style="display:none" id="delBankBtn1" onclick="deleteBankRow(1)"><i class="layui-icon">&#xe640;</i></button>
									    </div>
								    </div>
								    <fieldset class="layui-elem-field layui-field-title fieldset"  id="dockUnit">
								    <legend style="margin-left:40px;font-size:15px;font-weight:bold;"></legend>
										<div style="margin-top:20px" id="subDiv2">
							    			<div id="bank1-orgRow1">						
										  		<div class="layui-form-item">
												    <div class="layui-inline">
												    	<label class="layui-form-label" style="width:228px;">对接单位</label>
											      		<div class="layui-input-inline" style="width:30px;">
												      		<input type="text" name="dockOrg" value="" readonly="readonly" style="border:0px" class="layui-input">
											      		</div>
												    </div>
												    <div class="layui-inline">
												      	<label class="layui-form-label" style="width:170px;">对接人员</label>
												      	<div class="layui-input-inline" style="width:30px;">
												        	<input type="text" name="dockMan" value="" readonly="readonly" style="border:0px" class="layui-input">
												      	</div>
												    </div>
												    <div class="layui-inline">
												      	<label class="layui-form-label" style="width:120px;">对接人员职位</label>
												      	<div class="layui-input-inline" style="width:30px;">
												        	<input type="text" name="dockManPost" value="" readonly="readonly" style="border:0px" class="layui-input">
												      	</div>
												    </div>
												    <div class="layui-inline">
												      	<label class="layui-form-label" style="width:95px;">联系方式</label>
												      	<div class="layui-input-inline" style="width:30px;">
												        	<input type="text" name="dockManLink" value="" readonly="readonly" style="border:0px" class="layui-input">
												      	</div>
												    </div>
											    </div>
											    <div class="layui-form-item">
											    	<input type="hidden"  name="bankCode" value="1" >
										    		<div class="layui-inline width107">
												      	<label class="layui-form-label" style="width:150px;"></label>
												      	<div class="layui-input-inline" style="width:200px;">
												        	<input type="text" name="subDockOrg" placeholder="请输入" value="" lay-verify="required|COC" autocomplete="off" class="layui-input">
												      	</div>
												    </div>												    
												    <div class="layui-inline">
												    	<label class="layui-form-label" style="width:2px;"></label>
											      		<div class="layui-input-inline" style="width:120px;">
												      		<input type="text" name="subDockMan" placeholder="请输入" value="" lay-verify="required|COC" autocomplete="off" class="layui-input">
											      		</div>
												    </div>
												    <div class="layui-inline">
												    	<label class="layui-form-label" style="width:2px;"></label>
											      		<div class="layui-input-inline" style="width:150px;">
												      		<input type="text" name="subDockManPost" placeholder="请输入" value="" lay-verify="required|COC" autocomplete="off" class="layui-input">
											      		</div>
												    </div>
												    <div class="layui-inline">
												      	<label class="layui-form-label" style="width:2px;"></label>
												      	<div class="layui-input-inline" style="width:140px;">
												        	<input type="text" name="subDockManLink" placeholder="请输入" value="" lay-verify="required|telNumber" autocomplete="off" class="layui-input">
												      	</div>
												    </div>
												    <div class="layui-inline">
												    	<button type="button" class="layui-btn layui-btn-sm" id="bank1-addOrgBtn1" onclick="addOrgRow(this)"><i class="layui-icon">&#xe654;</i></button>
												    	<button type="button" class="layui-btn layui-btn-sm" style="display:none" id="bank1-delOrgBtn1" onclick="deleteOrgRow(this)"><i class="layui-icon">&#xe640;</i></button>
												    </div>
											    </div>		    
									    	</div>									    	
								    	</div>
								    </fieldset>									    		    
					    		</div>
	
					    		<div class="layui-form-item">
									<label class="layui-form-label" style="width:150px;">融资建议</label>
									<div class="layui-input-block">
										<textarea name="advise" class="layui-textarea" maxlength="500"
											lay-verify="required" style="width:899px;height:90px;"></textarea>
									</div>
								</div>
						  	</div>
						</fieldset>
							
			
				</div>
			</fieldset>	
			
			<fieldset class="layui-elem-field layui-field-title" style="margin-top: 15px;">
                 <legend class="layui-btn layui-legend" style="text-align:left;cursor:default;">附件信息  ></legend>
                 <div style="margin-top:20px;">
	                 <div class="layui-form-item">
					    <label class="layui-form-label" style="width:350px;">支持pdf、excel、word、图片资料，可上传多个</label>
					</div>
	                 <div class="layui-form-item">
					    <label class="layui-form-label">附件资料（选填）</label>
					    <div class="layui-input-block">
					    	<div class="layui-upload">
				              	<button type="button" class="layui-btn" id="1-upload-more">上传</button>
		                		<div class="layui-upload-list" id="1-upload-more-list">
		                		</div>
				            </div>
					    </div>
				  	</div>
				  </div>
            </fieldset>	
                 		   
			<div class="layui-form-item" style="position: fixed ! important; right: 30px; bottom:45%;z-index:10000;">
				<div class="layui-input-block">
		      		<button class="layui-btn layui-bg-blue layui-btn-normal layui-btn-lg  layui-btn-radius" type="button" lay-submit lay-filter="addInfo_form_submit" id="addInfo_form_submit">
		      		<i class="layui-icon layui-icon-ok layuiadmin-button-btn"></i>
		      		提交
		      		</button>
		      	</div>
		    </div>
			</form>			
  		</div>
	</div>
</div>
  <script>
	//静态资源路径前缀
	var staticPath = '${fileHttpPre}';
	var stateJSON = <infopub:dicJson groupNo="A00010028" />;
	
  layui.config({
    base: '${ctx}/resources/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'set', 'upload', 'element', 'laydate'], function(){
    var $ = layui.$
    ,form = layui.form
    ,element = layui.element
    ,laydate = layui.laydate
    ,upload = layui.upload;
    
 	// 正则校验
	form.verify({
		//验证汉字
	    CHS:[
	    	/^[\u0391-\uFFE5]+$/
	    	,'只能输入汉字'
	  	],
	  	//名字校验
	  	COC: [
			/^[\u4e00-\u9fa5_a-zA-Z0-9]+$/
			,'请输入正确的名称'
	  	],
	  	//大于0的正整数
	  	intNumber:[
			/^[1-9]\d*$/
			,'请输入正确的数字'
	  	],
	  	//数字只能有两位小数
	  	floatNumber:[
			/^([-]?)([0-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
			,'请输入正确的数字'
	  	],
	  	telNumber:[/^[1][3,4,5,7,8,9][0-9]{9}$/
			  		,'请输入正确的号码'
		],
	  	//数字大于等于0，并只能有两位小数
	  	floatAmount:[
			/^([0-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
			//var pattern=/^((\d+\.\d*[1-9]\d{1})|(\d*[1-9]\d*\.\d{2}))$/; 
			,'请输入正确的数字'
	  	]
	});
	//项目名称select监听
    form.on('select(add_select_proId)', function(data){
    	var id = data.value;
    	if(id==""||id==null){
    		$('#query-select-sgCityId').val('');
    		$('#query-select-carryOrg').val('');
    		$('#query-select-proRemarks').val('');
    		$('#query-select-costCae').val('');   		
    		$('#query-select-deviceCost').val('');
    		$('#query-select-inReadyCost').val('');
    		$('#query-select-periodInterest').val('');
    		$('#query-select-fluidCapital').val('');    		
    		$('#query-select-otherCost').val('');
    		$('#totalCost').val('');
    		$('#query-select-capitalFund').val('');
    		$('#query-select-capitalPercent').val('');  		
    		$('#query-select-stockFund').val('');
    		$('#query-select-stockPercent').val('');
    		$('#query-select-workYears').val('');
    		$('#query-select-buildYears').val('');   		
    		$('#query-select-omYears').val('');
    		$("input[name='backMechName']").prop("checked",false);
    		$('#query-select-cityLevel').val('');
    		$('#query-select-pubIncome').val('');
    		form.render();
    	}
    	
    	getLookInfoByProId(id);   	
    }); 
	//多文件列表示例
    upload.render({
	      elem: '#1-upload-more'
	      ,url: basePath + '/lookInfo/uploadAtt/'
	      ,data: {
	    	  types:1
	    		}
	      ,multiple: true
	      ,accept: 'file'
	      ,acceptMime: 'application/zip,application/x-rar-compressed,image/jpeg,image/png,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/pdf'
	   	  ,before: function(obj){ //obj参数包含的信息
	   		    layer.load(); //上传loading
	   		  }
	      ,done: function(res){
	    	  //如果上传失败
	          if(res.code > 0){	        	  
	        	  layer.closeAll('loading'); //关闭loading
	        	  return layer.msg(res.msg,{icon: 7});
	          }
	          //上传完毕
	   	  	  if(res.entity != null && res.entity.length > 0){	   	  		
				for(var i in res.entity){
					var lookInfo = res.entity[i];
					var arr = lookInfo.split("|");
					var imgSrc = "";
					var suffix = arr[1].substring(arr[1].lastIndexOf(".")+1,arr[1].length);
					if(suffix == 'jpg' || suffix == 'png'){
						imgSrc = "${fileHttpPre}/"+arr[3];
					}else{
						imgSrc = "${ctx}/resources/images/"+suffix+".jpg";
					}
	        		$('#1-upload-more-list')
	        		.append('<div class="layui-upload-img-div" id="upload_img_'+arr[2]+'"><img src="'+imgSrc+'" title="'
	        				+ arr[1] +'" class="layui-upload-img"><div class="mask"><a href="javascript:void(0)" onclick="showImg(\''+"${fileHttpPre}"
	        						+arr[3] +'\');">查看</a><a href="javascript:void(0)" onclick="del(\''
	        								+arr[2]+'\')";>删除</a></div><p>'+arr[1]+'</p><input type="hidden" value="'
	        								+lookInfo+'" id="fileAtt_'+arr[2]+'" name="fileAtt" ></input></div> ');
				}
		  	  }
	      }
	      ,allDone: function(obj){ //当文件全部被提交后，才触发
	    	  layer.closeAll('loading'); //关闭loading
	      }
	      ,error: function(){
	    	  layer.closeAll('loading'); //关闭loading
	          //上传失败
	          layer.msg("上传失败，请稍后再试~",{icon: 7});
	        }
	      
	      
	    });
   	//监听提交
  	form.on('submit(addInfo_form_submit)', function(data){
  		$("#addInfo_form_submit").removeAttr("lay-submit").removeClass("layui-bg-blue").addClass("layui-btn-disabled");
  		layer.load();
       	//提交 Ajax 成功后，静态更新表格中的数据      	
       	$.ajax({
           	type : 'post',
			url : basePath + '/lookInfo/save',
           	data: $('#addInfo_form').serialize(),
			success:function(result){
				if(result.success){
					layer.closeAll('loading'); //关闭loading
					layer.msg('提交单据成功~',{icon: 1});
					//两秒后关闭当前页面
					setTimeout(function(){
						/**
						 * 查找父菜单，并刷新
						 */
						var topDoc = $(window.top.document);
						var path = basePath + '/lookInfo/list';
						// 获取页面名称
						var name = topDoc.find(".layui-nav-item [lay-href^='" + path + "']").text();
						if(name == '' || name == null){
							name = '融资尽调';
						}
						window.parent.layui.index.openTabsPage(path, name);
						var iframe = window.parent.layui.admin.tabsBody(window.parent.layui.admin.tabsPage.index).find(".layadmin-iframe");
						iframe[0].contentWindow.location.reload(true);
						
						/**
						 * 关闭当前页
						 */
						var currPath = basePath + '/lookInfo/add';
						var layid = topDoc.find("li[lay-id^='" + currPath + "']").attr('lay-id');
						window.parent.layui.element.tabDelete('layadmin-layout-tabs', layid);//关闭当前页
				        }, 2000);
				}else{
					layer.closeAll('loading'); //关闭loading
  					$("#addInfo_form_submit").removeClass("layui-btn-disabled").addClass("layui-bg-blue").attr("lay-submit","");
					layer.msg(result.msg,{icon: 7});
			  	}
			}
       	});
   	});  
  	
  });
		
	//新增银行一行
	function addBankRow(t){
		var $ = layui.$;
		

		var delBtnCount = $("button[id^='delBankBtn']").length;
		if(delBtnCount == 1){
			$("button[id^='delBankBtn']").each(function(){
				$(this).removeAttr("style");
			});
		}
		
		var $lastBank = $(".bankRow:last") 
		var thisid = $lastBank.find(".width106").find("label").html();
		thisid = parseInt(thisid);
		var nextIndex = parseInt(thisid) + 1;
		var maxInd = $("div[id^='bankRow']").length;
		$("div[id^='bankRow']").each(function(){
			var tId = $(this).attr("id").substring(7);
			tId = parseInt(tId);
		  	if(tId > maxInd){
		  		maxInd = parseInt(tId);
		  	}
		});
		var ind = maxInd + 1;
		var medalHtml = '';
		medalHtml += '<div id="bankRow'+ind+'" class=bankRow >';
		medalHtml += '	<div class="layui-form-item">';
		medalHtml += '	<div class="layui-inline width106">';
		medalHtml += '		<label class="layui-form-label" style="width:60px;">'+nextIndex+'</label>';
		medalHtml += '		<div class="layui-input-inline">';
		medalHtml += '			<input class="width108" type="hidden" name="subShowIdx" value="'+nextIndex+'"/>';
		medalHtml += '		</div>';
		medalHtml += '	</div>';
		medalHtml += '	<div class="layui-inline">';
		medalHtml += '		<label class="layui-form-label" style="width:35px;"></label>';
		medalHtml += '		<div class="layui-input-inline" style="width:200px;">';
		medalHtml += '			<input type="text" name="subBankName" placeholder="请输入银行名称" value="" maxlength="100" lay-verify="required|COC" autocomplete="off" class="layui-input">';
		medalHtml += '		</div>';
		medalHtml += '	</div>';
		medalHtml += '	<div class="layui-inline">';
		medalHtml += '  	<label class="layui-form-label" style="width:45px;"></label>';
		medalHtml += '		<div class="layui-input-inline" style="width:150px;">';
		medalHtml += ' 			<select name="subBankType" lay-verify="required">';
		medalHtml += '			<option value="">请选择-银行性质</option><option value="1">国有银行</option><option value="2">地方主流银行</option><option value="3">政策性银行</option><option value="4">股份制银行</option>';
		medalHtml += ' 			</select>';
		medalHtml += '		</div>';
		medalHtml += '	</div>';
		medalHtml += '	<div class="layui-inline">';
		medalHtml += '		<label class="layui-form-label" style="width:45px;"></label>';
		medalHtml += '		<div class="layui-input-inline" style="width:200px;">';		
		medalHtml += '			<input type="text" name="subAdvice" placeholder="请输入沟通内容及意见" value="" lay-verify="required" autocomplete="off" class="layui-input">';
		medalHtml += '		</div>';
		medalHtml += '	</div>';
		medalHtml += '	<div class="layui-inline">';
		medalHtml += '		<button type="button" class="layui-btn layui-btn-sm" id="addBankBtn'+ind+'" onclick="addBankRow(this);"><i class="layui-icon">&#xe654;</i></button>';
		medalHtml += '		<button type="button" class="layui-btn layui-btn-sm" id="delBankBtn'+ind+'" onclick="deleteBankRow('+ind+');"><i class="layui-icon">&#xe640;</i></button>';
		medalHtml += '	</div>';
		medalHtml += '	</div>';
		medalHtml += '<fieldset class="layui-elem-field layui-field-title fieldset"  id="dockUnit">';
		medalHtml += '<legend style="margin-left:40px;font-size:15px;font-weight:bold;"></legend>';
		medalHtml += '	<div style="margin-top:20px" id="subDiv2">';
		medalHtml += '	<div id="bank'+ind+'-orgRow1">';
		medalHtml += '	  <div class="layui-form-item">';
		medalHtml += '		<div class="layui-inline">';
		medalHtml += '			<label class="layui-form-label" style="width:228px;">对接单位</label>';	
		medalHtml += '			<div class="layui-input-inline" style="width:30px;">';		
		medalHtml += '				<input type="text" name="dockOrg" value="" readonly="readonly" style="border:0px" class="layui-input">';	  		
		medalHtml += '			</div>';			    
		medalHtml += '		</div>';		
		medalHtml += '		<div class="layui-inline">';		      		
		medalHtml += '			<label class="layui-form-label" style="width:170px;">对接人员</label>';
		medalHtml += '			<div class="layui-input-inline" style="width:30px;">';
		medalHtml += '				<input type="text" name="dockMan" value="" readonly="readonly" style="border:0px" class="layui-input">';
		medalHtml += '			</div>';			    
		medalHtml += '		</div>';
		medalHtml += '		<div class="layui-inline">';		      		
		medalHtml += '			<label class="layui-form-label" style="width:120px;">对接人员职位</label>';
		medalHtml += '			<div class="layui-input-inline" style="width:30px;">';
		medalHtml += '				<input type="text" name="dockManPost" value="" readonly="readonly" style="border:0px" class="layui-input">';
		medalHtml += '			</div>';			    
		medalHtml += '		</div>';		      		
		medalHtml += '		<div class="layui-inline">';		      		
		medalHtml += '			<label class="layui-form-label" style="width:95px;">联系方式</label>';
		medalHtml += '			<div class="layui-input-inline" style="width:30px;">';
		medalHtml += '				<input type="text" name="dockManLink" value="" readonly="readonly" style="border:0px" class="layui-input">';
		medalHtml += '			</div>';			    
		medalHtml += '		</div>';			    
		medalHtml += '</div>';			   
		medalHtml += '	<div class="layui-form-item">';
		medalHtml += '      <input type="hidden" name="bankCode" value="'+nextIndex+'" >';
		medalHtml += '		<div class="layui-inline width107">';
		medalHtml += '			<label class="layui-form-label" style="width:150px;"></label>';
		medalHtml += '			<div class="layui-input-inline" style="width:200px;">';
		medalHtml += '				<input type="text" name="subDockOrg" placeholder="请输入" value="" lay-verify="required|COC" autocomplete="off" class="layui-input">';		   
		medalHtml += '			</div>';			    
		medalHtml += '		</div>';
		medalHtml += '		<div class="layui-inline">';
		medalHtml += '			<label class="layui-form-label" style="width:2px;"></label>';
		medalHtml += '			<div class="layui-input-inline" style="width:120px;">';
		medalHtml += '				<input type="text" name="subDockMan" placeholder="请输入" value="" lay-verify="required|COC" autocomplete="off" class="layui-input">';		   
		medalHtml += '			</div>';			    
		medalHtml += '		</div>';	
		medalHtml += '		<div class="layui-inline">';
		medalHtml += '			<label class="layui-form-label" style="width:2px;"></label>';
		medalHtml += '			<div class="layui-input-inline" style="width:150px;">';
		medalHtml += '				<input type="text" name="subDockManPost" placeholder="请输入" value="" lay-verify="required|COC" autocomplete="off" class="layui-input">';		   
		medalHtml += '			</div>';			    
		medalHtml += '		</div>';			    
		medalHtml += '		<div class="layui-inline">';
		medalHtml += '			<label class="layui-form-label" style="width:2px;"></label>';
		medalHtml += '			<div class="layui-input-inline" style="width:140px;">';
		medalHtml += '				<input type="text" name="subDockManLink" placeholder="请输入" value="" lay-verify="required|telNumber" autocomplete="off" class="layui-input">';		   
		medalHtml += '			</div>';			    
		medalHtml += '		</div>';			    
		medalHtml += '		<div class="layui-inline">';			      									    
		medalHtml += '		<button type="button" class="layui-btn layui-btn-sm" id="bank'+ind+'-addOrgBtn1" onclick="addOrgRow(this)"><i class="layui-icon">&#xe654;</i></button>';			    
		medalHtml += '		<button type="button" class="layui-btn layui-btn-sm" style="display:none" id="bank'+ind+'-delOrgBtn1" onclick="deleteOrgRow(this)"><i class="layui-icon">&#xe640;</i></button>';			   
		medalHtml += '		</div>';		
		medalHtml += '	</div>';			
		medalHtml += '</div>';
		medalHtml += '</div>';			    
		medalHtml += '</fieldset>';
		medalHtml += '</div>';

		$lastBank.after(medalHtml);
		layui.form.render();
	}
	
	//删除银行一行
	function deleteBankRow(id){
		var $ = layui.$;
		layui.layer.confirm('确定删除？',{icon:3, title :'提示'}, function(index){
	    	$("#bankRow"+id).remove();
	    	$("div[id^='bankRow']").each(function(index){
	    		var nextId = index+1;
	    		$(this).find(".width106").find("label").text(nextId).end().find(".width106").find("input").val(nextId)
	    		$(this).find(".width107").each(function(){
	    			$(this).prev().val(nextId);	    			
	    		})
	    		$(this).find(".width108").val(nextId);
			});
	    	
	    	var delBtnCount = $("button[id^='delBankBtn']").length;
			if(delBtnCount == 1){
				$("button[id^='delBankBtn']").each(function(){
					$(this).attr("style","display:none");
				});
			}
			layui.layer.close(index);
 		});
	}
  
	//新增银行下对接单位一行
	function addOrgRow(t){
		
		var $ = layui.$;
		var $bankRow =	$(t).parents("div[id^='bankRow']")
		var bankRowId =  $bankRow.attr('id').replace('Row','');
		var bankId = $bankRow.find('.width106').find('label').text();
		var $delBtn = $("button[id^='"+bankRowId+"-delOrgBtn']");
		var delBtnCount = $delBtn.length;
		if(delBtnCount == 1){
			$delBtn.each(function(){
				$(this).removeAttr("style");
			});
		}
		var $lastRow =$("div[id^="+bankRowId+"-orgRow]:last");
		var thisid = $lastRow.find(".layui-form-item:last input:eq(0)").val();
		thisid = parseInt(thisid);
		var nextIndex = thisid + 1;
		var $orgRow = $("div[id^='"+bankRowId+"-orgRow']");
		var maxInd = $orgRow.length;
		$orgRow.each(function(){
			var tId = $(this).attr("id").split('-')[1].substring(6);
			tId = parseInt(tId);
		  	if(tId > maxInd){
		  		maxInd = parseInt(tId);
		  	}
		});
		var ind = maxInd + 1;
		var medalHtml = '';
		medalHtml += '<div id="'+bankRowId+'-orgRow'+ind+'">';						    
		medalHtml += '	<div class="layui-form-item">';
		medalHtml += '      <input type="hidden" name="bankCode" value="'+bankId+'" >';		
		medalHtml += '		<div class="layui-inline width107">';
		medalHtml += '			<label class="layui-form-label" style="width:150px;"></label>';
		medalHtml += '			<div class="layui-input-inline" style="width:200px;">';
		medalHtml += '				<input type="text" name="subDockOrg" placeholder="请输入" value="" lay-verify="required|COC" autocomplete="off" class="layui-input">';		   
		medalHtml += '			</div>';			    
		medalHtml += '		</div>';
		medalHtml += '		<div class="layui-inline">';
		medalHtml += '			<label class="layui-form-label" style="width:2px;"></label>';
		medalHtml += '			<div class="layui-input-inline" style="width:120px;">';
		medalHtml += '				<input type="text" name="subDockMan" placeholder="请输入" value="" lay-verify="required|COC" autocomplete="off" class="layui-input">';		   
		medalHtml += '			</div>';			    
		medalHtml += '		</div>';	
		medalHtml += '		<div class="layui-inline">';
		medalHtml += '			<label class="layui-form-label" style="width:2px;"></label>';
		medalHtml += '			<div class="layui-input-inline" style="width:150px;">';
		medalHtml += '				<input type="text" name="subDockManPost" placeholder="请输入" value="" lay-verify="required|COC" autocomplete="off" class="layui-input">';		   
		medalHtml += '			</div>';			    
		medalHtml += '		</div>';			    
		medalHtml += '		<div class="layui-inline">';
		medalHtml += '			<label class="layui-form-label" style="width:2px;"></label>';
		medalHtml += '			<div class="layui-input-inline" style="width:140px;">';
		medalHtml += '				<input type="text" name="subDockManLink" placeholder="请输入" value="" lay-verify="required|telNumber" autocomplete="off" class="layui-input">';		   
		medalHtml += '			</div>';			    
		medalHtml += '		</div>';			   
		medalHtml += '		<div class="layui-inline">';			      									    
		medalHtml += '		<button type="button" class="layui-btn layui-btn-sm" id="'+bankRowId+'-addOrgBtn'+ind+'" onclick="addOrgRow(this)"><i class="layui-icon">&#xe654;</i></button>';			    
		medalHtml += '		<button type="button" class="layui-btn layui-btn-sm" id="'+bankRowId+'-delOrgBtn'+ind+'" onclick="deleteOrgRow(this)"><i class="layui-icon">&#xe640;</i></button>';			   
		medalHtml += '		</div>';			    
		medalHtml += '	</div>';
		medalHtml += '</div>';
		$lastRow.after(medalHtml);
		layui.form.render();
	}
	
	//删除银行下对接单位一行
	function deleteOrgRow(t){
		var $ = layui.$;
		var Row = $(t).attr('id').replace('delOrgBtn','orgRow');		
		var bankRowId = Row.split('-')[0];
		Row = '#'+Row;
		var $orgRow = $("div[id^='"+bankRowId+"-orgRow']");
		layui.layer.confirm('确定删除？',{icon:3, title :'提示'}, function(index){
			$(Row).remove();	    	
	    	var $delBtn = $("button[id^='"+bankRowId+"-delOrgBtn']");
	    	var delBtnCount = $delBtn.length;
			if(delBtnCount == 1){
				$delBtn.css("display","none");
			}
			
			layui.layer.close(index);
 		});
	}
	
	//删除文件
	function del(index){
		layui.$("#fileAtt_"+index).remove();
		layui.$("#upload_img_"+index).remove();
	}
  
	//根据url查看文件
	function showImg(url){
		var openWin = window.open(url,'','left=410,height=768, width=1024, top=200,  toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
	}
  	
	//根据项目编号带出所有需要的字段
	function getLookInfoByProId(proCode){
		var $ = layui.$
	  	,form = layui.form
			//获取所有该项目信息
			$.ajax({
				type : "POST", //提交方式  
				url : "${ctx}/lookInfo/getLookInfoByProId",//路径  
				data : {
					"proCode" :proCode
				},//数据，这里使用的是Json格式进行传输  
				success : function(result) {//返回数据根据结果进行相应的处理 
					if(result.flag==true){
						form.val('addInfo_form',result.queryByProCode); // 填充原值
						var lookInfo = result.queryByProCode;
						//项目所在地
						var strCityBuffer = "";
						strCityBuffer+= '<option value="">请选择</option>';
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strCityBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strCityBuffer+= ' selected';
								}
								strCityBuffer+= '>'+lookInfo.sgCityName+'</option>';
							}
						$('#query-select-sgCityId').append(strCityBuffer);
						$('#query-select-sgCityId_hidden').val(lookInfo.sgCityName);
						//项目实施单位
						var strCarryOrgBuffer = "";
						strCarryOrgBuffer+= '<option value="">请选择</option>';						
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strCarryOrgBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strCarryOrgBuffer+= ' selected';
								}
								strCarryOrgBuffer+= '>'+lookInfo.carryOrg+'</option>';
							}				       
						$('#query-select-carryOrg').append(strCarryOrgBuffer);
						$('#query-select-carryOrg_hidden').val(lookInfo.carryOrg);
						//项目简介
						if(lookInfo.proCode != null && lookInfo.proName != null){
							if(proCode!=undefined&&proCode==lookInfo.proCode){
								$('#query-select-proRemarks').val(lookInfo.proRemarks);
							}
						}				       
						//建安工程费
						var strCostCaeBuffer = "";
						strCostCaeBuffer+= '<option value="">请选择</option>';						
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strCostCaeBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strCostCaeBuffer+= ' selected';
								}
								strCostCaeBuffer+= '>'+lookInfo.costCae+'</option>';
							}				       
						$('#query-select-costCae').append(strCostCaeBuffer);
						$('#query-select-costCae_hidden').val(lookInfo.costCae);
						//设备购置工程费
						var strDeviceCostBuffer = "";
						strDeviceCostBuffer+= '<option value="">请选择</option>';					
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strDeviceCostBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strDeviceCostBuffer+= ' selected';
								}
								strDeviceCostBuffer+= '>'+lookInfo.deviceCost+'</option>';
							}				   
						$('#query-select-deviceCost').append(strDeviceCostBuffer);
						$('#query-select-deviceCost_hidden').val(lookInfo.deviceCost);
						//预备费
						var strInReadyCostBuffer = "";
						strInReadyCostBuffer+= '<option value="">请选择</option>';						
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strInReadyCostBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strInReadyCostBuffer+= ' selected';
								}
								strInReadyCostBuffer+= '>'+lookInfo.inReadyCost+'</option>';
							}				  
						$('#query-select-inReadyCost').append(strInReadyCostBuffer);
						$('#query-select-inReadyCost_hidden').val(lookInfo.inReadyCost);
						//建设期利息
						var strPeriodInterestBuffer = "";
						strPeriodInterestBuffer+= '<option value="">请选择</option>';						
							if(lookInfo.proCode != null &lookInfo.proName != null){
								strPeriodInterestBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strPeriodInterestBuffer+= ' selected';
								}
								strPeriodInterestBuffer+= '>'+lookInfo.periodInterest+'</option>';
							}			        
						$('#query-select-periodInterest').append(strPeriodInterestBuffer);
						$('#query-select-periodInterest_hidden').val(lookInfo.periodInterest);
						//铺底流动资金
						var strFluidCapitalBuffer = "";
						strFluidCapitalBuffer+= '<option value="">请选择</option>';						
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strFluidCapitalBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strFluidCapitalBuffer+= ' selected';
								}
								strFluidCapitalBuffer+= '>'+lookInfo.fluidCapital+'</option>';
							}				        
						$('#query-select-fluidCapital').append(strFluidCapitalBuffer);
						$('#query-select-fluidCapital_hidden').val(lookInfo.fluidCapital);
						//工程建设其他费用
						var strOtherCostBuffer = "";
						strOtherCostBuffer+= '<option value="">请选择</option>';						
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strOtherCostBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strOtherCostBuffer+= ' selected';
								}
								strOtherCostBuffer+= '>'+lookInfo.otherCost+'</option>';
							}				       
						$('#query-select-otherCost').append(strOtherCostBuffer);
						$('#query-select-otherCost_hidden').val(lookInfo.otherCost);
						//总计
						var strTotalCostBuffer = "";										
						if(lookInfo.proCode != null && lookInfo.proName != null){								
							strTotalCostBuffer+= (parseFloat(lookInfo.costCae)
							+parseFloat(lookInfo.deviceCost)+parseFloat(lookInfo.inReadyCost)
							+parseFloat(lookInfo.periodInterest)+parseFloat(lookInfo.fluidCapital)
							+parseFloat(lookInfo.otherCost)).toFixed(2);
						}
						$('#totalCost').val(strTotalCostBuffer);
						
						//资本金数额
						var strCapitalFundBuffer = "";
						strCapitalFundBuffer+= '<option value="">请选择</option>';					
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strCapitalFundBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strCapitalFundBuffer+= ' selected';
								}
								strCapitalFundBuffer+= '>'+lookInfo.capitalFund+'</option>';
							}				       
						$('#query-select-capitalFund').append(strCapitalFundBuffer);
						$('#query-select-capitalFund_hidden').val(lookInfo.capitalFund);
						//资本金比列
						var strCapitalPercentBuffer = "";
						strCapitalPercentBuffer+= '<option value="">请选择</option>';
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strCapitalPercentBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strCapitalPercentBuffer+= ' selected';
								}
								strCapitalPercentBuffer+= '>'+lookInfo.capitalPercent+'</option>';
							}				     
						$('#query-select-capitalPercent').append(strCapitalPercentBuffer);
						$('#query-select-capitalPercent_hidden').val(lookInfo.capitalPercent);
						//我方股权出资金额
						var strStockFundBuffer = "";
						strStockFundBuffer+= '<option value="">请选择</option>';						
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strStockFundBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strStockFundBuffer+= ' selected';
								}
								strStockFundBuffer+= '>'+lookInfo.stockFund+'</option>';
							}
						$('#query-select-stockFund').append(strStockFundBuffer);
						$('#query-select-stockFund_hidden').val(lookInfo.stockFund);
						//我方股权比列
						var strStockPercentBuffer = "";
						strStockPercentBuffer+= '<option value="">请选择</option>';						
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strStockPercentBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strStockPercentBuffer+= ' selected';
								}
								strStockPercentBuffer+= '>'+lookInfo.stockPercent+'</option>';
							}				       
						$('#query-select-stockPercent').append(strStockPercentBuffer);
						$('#query-select-stockPercent_hidden').val(lookInfo.stockPercent);
						//合作周期
						var strWorkYearsBuffer = "";
						strWorkYearsBuffer+= '<option value="">请选择</option>';
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strWorkYearsBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strWorkYearsBuffer+= ' selected';
								}
								strWorkYearsBuffer+= '>'+lookInfo.workYears+'</option>';
							}
						$('#query-select-workYears').append(strWorkYearsBuffer);
						$('#query-select-workYears_hidden').val(lookInfo.workYears);
						//建设周期
						var strBuildYearsBuffer = "";
						strBuildYearsBuffer+= '<option value="">请选择</option>';
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strBuildYearsBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strBuildYearsBuffer+= ' selected';
								}
								strBuildYearsBuffer+= '>'+lookInfo.buildYears+'</option>';
							}
						$('#query-select-buildYears').append(strBuildYearsBuffer);
						$('#query-select-buildYears_hidden').val(lookInfo.buildYears);
						//运营周期
						var strOmYearsBuffer = "";
						strOmYearsBuffer+= '<option value="">请选择</option>';
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strOmYearsBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strOmYearsBuffer+= ' selected';
								}
								strOmYearsBuffer+= '>'+lookInfo.omYears+'</option>';
							}
						$('#query-select-omYears').append(strOmYearsBuffer);
						$('#query-select-omYears_hidden').val(lookInfo.omYears);
						//获取回报机制复选框
						var backCheckbox = $("input[name=backMechName]");
						backCheckbox.each(function(){
							if(lookInfo.backMech.indexOf($(this).val()) != -1){
				            	$(this).prop('checked', true);
							}else{
				            	$(this).prop('checked', false);
							}
				         	form.render();
				         })
						//项目落地财政级别
						var strCityLevelBuffer = "";
						strCityLevelBuffer+= '<option value="">请选择</option>';
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strCityLevelBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strCityLevelBuffer+= ' selected';
								}
								strCityLevelBuffer+= '>'+lookInfo.cityLevel+'</option>';
							}
						$('#query-select-cityLevel').append(strCityLevelBuffer);
						$('#query-select-cityLevel_hidden').val(lookInfo.cityLevel);
						//一般公共预算收入
						var strPubIncomeBuffer = "";
						strPubIncomeBuffer+= '<option value="">请选择</option>';
							if(lookInfo.proCode != null && lookInfo.proName != null){
								strPubIncomeBuffer+= '<option value='+lookInfo.proCode;
								if(proCode!=undefined&&proCode==lookInfo.proCode){
									strPubIncomeBuffer+= ' selected';
								}
								strPubIncomeBuffer+= '>'+lookInfo.pubIncome+'</option>';
							}
						$('#query-select-pubIncome').append(strPubIncomeBuffer);
						$('#query-select-pubIncome_hidden').val(lookInfo.pubIncome);
				         form.render();
					}else{
						layer.msg('数据通信异常~',{icon: 0});
					}
				} 
			});
		}
  </script>
</body>
</html>

